<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>会员卡分享详情</title>
<link rel="shortcut icon" href="/carworld_weixin/images/favicon.ico" />
<script src="/carworld_weixin/js/jquery-3.3.1.min.js"></script>
<script src="/carworld_weixin/js/bootstrap.min.js"></script>
<!-- Bootstrap -->
<link href="/carworld_weixin/css/bootstrap.min.css" rel="stylesheet">
<link href="/carworld_weixin/css/style2.css" rel="stylesheet">

</head>
<body>
	<div class="row">
		<!-- Column -->
		<div class="col-lg-4 col-xlg-3 col-md-5">
			<!-- Column -->
			<div class="card">
				<img class="card-img-top" style="width: 100%;" src="/carworld_weixin/images/weatherbg.jpg" alt="Card image cap">
				<div class="card-body little-profile text-center">
					<div class="pro-img">
						<img src="" alt="user" id="userPhoto">
					</div>
					<h3 class="m-b-0" id="userName"></h3>
					<p>会员</p>

					<div class="row text-center">
						<!-- <div class="col-lg-4 col-md-4">
							<h3 class="m-b-0 font-light" id="cardCount"></h3>
							<h5>可分享套餐数</h5>
						</div> -->
						<div class="col-lg-4 col-md-4">
							<h3 class="m-b-0 font-light" id="sharedCardCount"></h3>
							<h5>已分享套餐数</h5>
						</div>

					</div>
				</div>
			</div>
			<!-- Column -->
			<div class="card">
				<div class="card-body bg-info" style="height: 50px;">
					<h4 class="text-white card-title" style="line-height: 50px;">&nbsp;&nbsp;谁领取了我的会员卡套餐</h4>
				</div>
				<div class="card-body">
					<div class="message-box contact-box">
						<div class="message-widget contact-widget"></div>
					</div>
				</div>
			</div>
		</div>

	</div>

	<script>
$('.message-widget').empty();
$.ajax({
	type : 'GET',
	url : '/carworld_weixin/vipcard/vipCardSharedInfo',
	dataType : 'json',
	contentType : 'application/json',
	success : function(data) {
		$("#userPhoto").attr("src",data.user.user_photo);
		$("#userName").html(data.user.name);
		var count=data.page.totalRow;
		$("#sharedCardCount").html(count);
		if(0==count){
			$('.message-widget').append('<div style="text-align:center;font-size:14px;color:#bbb;">还没有小伙伴领取你的会员卡哦~</div>');
			return;
		}
		$.each(data.page.list, function(index, elem) {
			var html=
				'<a href="#"><div class="user-img"> <img src="'+elem.user_photo+'" alt="user" class="img-circle"> <span class="profile-status online pull-right"></span> </div>'+ 
				'<div class="mail-contnet"><h5>'+elem.name+'</h5><span class="time">领取套餐时间：'+elem.create_time+'</span> </div></a>';
			$('.message-widget').append(html);
		});
	}
});
</script>

</body>
</html>